package definite.Guide.Book.JOptionPane;

import javax.swing.JOptionPane;

public class InputDialog {

	public static void main(String[] args) {
		String list[] =
			{ "Mot", "Hai", "Ba", "Bon", "Nam", "Sau", "Bay", "Tam" };
		JOptionPane.showInputDialog(null, "Choose a number",
				"JOption Pane Demo", JOptionPane.QUESTION_MESSAGE, null, list,
				"Ba");

		// Twenty of the moons of Saturn
		String bigList[] =
			{ "Pan", "Atlas", "Prometheus", "Pandora", "Epimetheus", "Janus",
				"Mimas", "Enceladus", "Telesto", "Tethys", "Calypso", "Dione",
				"Helene", "Rhea", "Titan", "Hyperion", "Iapetus", "Phoebe",
				"Skadi", "Mundilfari" };
		JOptionPane.showInputDialog(null, "Pick a printer", "Input",
				JOptionPane.QUESTION_MESSAGE, null, bigList, "Titan");

		String name =
			JOptionPane.showInputDialog(null, "File name", "Add New",
					JOptionPane.OK_CANCEL_OPTION);
		System.out.println(name);

	}

}
